Results 1 to 4 of 4

Thread: "Select field1, field2, ... field40 from table" crashes

  1. #1
    Manuel Guest

    "Select field1, field2, ... field40 from table" crashes

    Hallo Frank,

    with tables with many fields, the sql-Statement "Select * from table" works fine but "Select field1, field2, ... from table" an data-provider error occurs. I want to specify the fields, because I want aspdb to show them in an order.

    Some other problems:
    the dbEditDropFlds works with oracle only if the field is not varchar2. Do you know a workaround?

    In my tests I found, that aspdb has problems with the oracle-fieldtype Long.


    Thanks for your help from germany

    Manuel

  2. #2
    John Guest

    "Select field1, field2, ... field40 from table" crashes (reply)

    Hi Manuel,

    Are you exceeding the maximum 255 character limit for a single line of ASP
    code? You need to build your statement up like this:

    Q = "Select stuff ..................................."
    Q = Q & "more stuff.................................."
    Q = Q & "more stuff.................................."
    Q = Q & "more stuff.................................."
    Q = Q & "more stuff.................................."

    This way your query can be huge. I built one that was 20k just to test it and it worked. I don't imagine you'll exceed that?

    John

    On 1/15/99 9:02:45 AM, Manuel wrote:
    > Hallo Frank,

    with tables with many fields, the sql-Statement "Select
    > * from table" works fine but "Select field1, field2, ... from
    > table" an data-provider error occurs. I want to specify the fields,
    > because I want aspdb to show them in an order.

    Some other problems:
    the
    > dbEditDropFlds works with oracle only if the field is not varchar2. Do you
    > know a workaround?

    In my tests I found, that aspdb has problems with the
    > oracle-fieldtype Long.


    Thanks for your help from germany

    Manuel

  3. #3
    Frank Guest

    "Select field1, field2, ... field40 from table" crashes (reply)

    Manuel,
    Select f1, f2, f3 has no reason to crash. I have the following from a customer and has no problem -

    sSQL="SELECT " _
    & " Job.JobID, Job.ProjectID , " _
    & " Project.PProject AS Project, " _
    & " Job.JTitle AS JobTitle, " _
    & " COUNT(Bid.JobID) AS NumBids, " _
    & " Job.JobStatus AS JobStatus, " _
    & " Job.JPostDate AS PostDate, " _
    & " Job.JDueDate AS DueDate, " _
    & " Job.JModifyDate AS LastModified, " _
    & " Project.UserID " _
    & "FROM ((Project RIGHT OUTER JOIN Job ON Project.ProjectID = Job.ProjectID) " _
    & " LEFT OUTER JOIN Bid ON Job.JobID = Bid.JobID) " _
    & "WHERE (Job.UserID = 12345) " _
    & "GROUP BY Job.JobID, Job.ProjectID, Job.JTitle, " _
    & " Job.JobStatus, Job.JPostDate, Job.JDueDate, " _
    & " Job.JModifyDate, Job.ProjectID, Project.PProject, Project.UserID"

    Show your SQL statement/code that crash. Make sure you set the SQL as a varaible and feed into the property.

    As for dropdown problem, it must be some of the ORACLE data type. I discover that ORACLE uses some odd datatype. But again, you should get the "type not supported" warning in the newer versions. So what is the datatype of the field(s) that has problem in dropping down ? Use the datatype.asp to find out. I also discover that SQL7 is using some new datatypes which we since support.


    Frank



    On 1/15/99 9:02:45 AM, Manuel wrote:
    > Hallo Frank,

    with tables with many fields, the sql-Statement "Select
    > * from table" works fine but "Select field1, field2, ... from
    > table" an data-provider error occurs. I want to specify the fields,
    > because I want aspdb to show them in an order.

    Some other problems:
    the
    > dbEditDropFlds works with oracle only if the field is not varchar2. Do you
    > know a workaround?

    In my tests I found, that aspdb has problems with the
    > oracle-fieldtype Long.


    Thanks for your help from germany

    Manuel

  4. #4
    Frank Guest

    "Select field1, field2, ... field40 from table" crashes (reply)

    A 20K query ??? A bit overkill ??


    On 1/15/99 11:28:20 AM, John wrote:
    > Hi Manuel,

    Are you exceeding the maximum 255 character limit for a
    > single line of ASP
    code? You need to build your statement up like
    > this:

    Q = "Select stuff ..................................."
    Q
    > = Q & "more stuff.................................."
    Q = Q &
    > "more stuff.................................."
    Q = Q & "more
    > stuff.................................."
    Q = Q & "more
    > stuff.................................."

    This way your query can be
    > huge. I built one that was 20k just to test it and it worked. I don't
    > imagine you'll exceed that?

    John

    On 1/15/99 9:02:45 AM, Manuel
    > wrote:
    > Hallo Frank,

    with tables with many fields, the sql-Statement
    > "Select
    > * from table" works fine but "Select field1,
    > field2, ... from
    > table" an data-provider error occurs. I want to
    > specify the fields,
    > because I want aspdb to show them in an
    > order.

    Some other problems:
    the
    > dbEditDropFlds works with oracle
    > only if the field is not varchar2. Do you
    > know a workaround?

    In my
    > tests I found, that aspdb has problems with the
    > oracle-fieldtype
    > Long.


    Thanks for your help from germany

    Manuel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •